/****************************************************************************
** Form implementation generated from reading ui file 'form1.ui'
**
** Created: gio giu 12 21:26:51 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "form1.h"

#include <qvariant.h>
#include <qlabel.h>
#include <qgroupbox.h>
#include <qspinbox.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qaction.h>
#include <qmenubar.h>
#include <qpopupmenu.h>
#include <qtoolbar.h>
#include <qimage.h>
#include <qpixmap.h>

#include "../form1.ui.h"
/*
 *  Constructs a Form1 as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
Form1::Form1( QWidget* parent, const char* name, WFlags fl )
    : QMainWindow( parent, name, fl )
{
    (void)statusBar();
    if ( !name )
	setName( "Form1" );
    setCentralWidget( new QWidget( this, "qt_central_widget" ) );

    loglabel = new QLabel( centralWidget(), "loglabel" );
    loglabel->setGeometry( QRect( 10, 550, 590, 20 ) );

    step1 = new QGroupBox( centralWidget(), "step1" );
    step1->setEnabled( TRUE );
    step1->setGeometry( QRect( 10, 10, 210, 110 ) );

    spinBox1 = new QSpinBox( step1, "spinBox1" );
    spinBox1->setGeometry( QRect( 10, 40, 187, 24 ) );
    spinBox1->setMaxValue( 5 );
    spinBox1->setMinValue( 2 );

    pushButton3 = new QPushButton( step1, "pushButton3" );
    pushButton3->setGeometry( QRect( 10, 70, 187, 26 ) );

    textLabel3 = new QLabel( step1, "textLabel3" );
    textLabel3->setGeometry( QRect( 11, 21, 187, 17 ) );

    step2 = new QGroupBox( centralWidget(), "step2" );
    step2->setEnabled( FALSE );
    step2->setGeometry( QRect( 10, 130, 590, 330 ) );

    textLabel4_2_2_3 = new QLabel( step2, "textLabel4_2_2_3" );
    textLabel4_2_2_3->setGeometry( QRect( 224, 200, 16, 24 ) );

    textLabel4_2_3 = new QLabel( step2, "textLabel4_2_3" );
    textLabel4_2_3->setGeometry( QRect( 224, 170, 16, 24 ) );

    textLabel4_2_2_2_2 = new QLabel( step2, "textLabel4_2_2_2_2" );
    textLabel4_2_2_2_2->setGeometry( QRect( 224, 230, 16, 24 ) );

    textLabel4_2_2_2_2_2 = new QLabel( step2, "textLabel4_2_2_2_2_2" );
    textLabel4_2_2_2_2_2->setGeometry( QRect( 224, 260, 16, 24 ) );

    Path_File[2] = new QLineEdit( step2, "Path_File[2]" );
    Path_File[2]->setEnabled( FALSE );
    Path_File[2]->setGeometry( QRect( 240, 200, 330, 24 ) );

    Path_File[3] = new QLineEdit( step2, "Path_File[3]" );
    Path_File[3]->setEnabled( FALSE );
    Path_File[3]->setGeometry( QRect( 240, 230, 330, 24 ) );

    Path_File[4] = new QLineEdit( step2, "Path_File[4]" );
    Path_File[4]->setEnabled( FALSE );
    Path_File[4]->setGeometry( QRect( 240, 260, 330, 24 ) );

    Gamecodes[2] = new QLineEdit( step2, "Gamecodes[2]" );
    Gamecodes[2]->setEnabled( FALSE );
    Gamecodes[2]->setGeometry( QRect( 240, 80, 100, 24 ) );

    Gamecodes[3] = new QLineEdit( step2, "Gamecodes[3]" );
    Gamecodes[3]->setEnabled( FALSE );
    Gamecodes[3]->setGeometry( QRect( 340, 80, 100, 24 ) );

    Gamecodes[0] = new QLineEdit( step2, "Gamecodes[0]" );
    Gamecodes[0]->setEnabled( FALSE );
    Gamecodes[0]->setGeometry( QRect( 40, 80, 100, 24 ) );

    Gamecodes[4] = new QLineEdit( step2, "Gamecodes[4]" );
    Gamecodes[4]->setEnabled( FALSE );
    Gamecodes[4]->setGeometry( QRect( 440, 80, 100, 24 ) );

    Gamecodes[1] = new QLineEdit( step2, "Gamecodes[1]" );
    Gamecodes[1]->setEnabled( FALSE );
    Gamecodes[1]->setGeometry( QRect( 140, 80, 100, 24 ) );

    Path_File[1] = new QLineEdit( step2, "Path_File[1]" );
    Path_File[1]->setEnabled( FALSE );
    Path_File[1]->setGeometry( QRect( 240, 170, 330, 24 ) );

    textLabel4_3 = new QLabel( step2, "textLabel4_3" );
    textLabel4_3->setGeometry( QRect( 224, 140, 16, 24 ) );

    textLabel1_3_2_2_3_2 = new QLabel( step2, "textLabel1_3_2_2_3_2" );
    textLabel1_3_2_2_3_2->setGeometry( QRect( 10, 50, 90, 24 ) );

    pbok = new QPushButton( step2, "pbok" );
    pbok->setGeometry( QRect( 460, 290, 113, 26 ) );

    textLabel1_3_2_2_4 = new QLabel( step2, "textLabel1_3_2_2_4" );
    textLabel1_3_2_2_4->setGeometry( QRect( 250, 110, 90, 20 ) );

    txt_main_title = new QLineEdit( step2, "txt_main_title" );
    txt_main_title->setGeometry( QRect( 190, 30, 350, 24 ) );

    groupBox6 = new QGroupBox( step2, "groupBox6" );
    groupBox6->setGeometry( QRect( 10, 110, 191, 171 ) );

    textLabel1_3_2_2_2 = new QLabel( groupBox6, "textLabel1_3_2_2_2" );
    textLabel1_3_2_2_2->setGeometry( QRect( 21, 51, 71, 24 ) );

    textLabel1_3_2_2_2_2 = new QLabel( groupBox6, "textLabel1_3_2_2_2_2" );
    textLabel1_3_2_2_2_2->setGeometry( QRect( 21, 81, 71, 24 ) );

    textLabel1_3_2_2_2_2_2 = new QLabel( groupBox6, "textLabel1_3_2_2_2_2_2" );
    textLabel1_3_2_2_2_2_2->setGeometry( QRect( 21, 111, 71, 24 ) );

    textLabel1_3_2_2_2_2_2_2 = new QLabel( groupBox6, "textLabel1_3_2_2_2_2_2_2" );
    textLabel1_3_2_2_2_2_2_2->setGeometry( QRect( 21, 141, 71, 24 ) );

    textLabel1_3_2_2 = new QLabel( groupBox6, "textLabel1_3_2_2" );
    textLabel1_3_2_2->setGeometry( QRect( 21, 21, 71, 24 ) );

    Level_compression[0] = new QSpinBox( groupBox6, "Level_compression[0]" );
    Level_compression[0]->setEnabled( FALSE );
    Level_compression[0]->setGeometry( QRect( 98, 21, 71, 24 ) );
    Level_compression[0]->setMaxValue( 9 );
    Level_compression[0]->setMinValue( 1 );

    Level_compression[1] = new QSpinBox( groupBox6, "Level_compression[1]" );
    Level_compression[1]->setEnabled( FALSE );
    Level_compression[1]->setGeometry( QRect( 98, 51, 71, 24 ) );
    Level_compression[1]->setMaxValue( 9 );
    Level_compression[1]->setMinValue( 1 );

    Level_compression[2] = new QSpinBox( groupBox6, "Level_compression[2]" );
    Level_compression[2]->setEnabled( FALSE );
    Level_compression[2]->setGeometry( QRect( 98, 81, 71, 24 ) );
    Level_compression[2]->setMaxValue( 9 );
    Level_compression[2]->setMinValue( 1 );

    Level_compression[3] = new QSpinBox( groupBox6, "Level_compression[3]" );
    Level_compression[3]->setEnabled( FALSE );
    Level_compression[3]->setGeometry( QRect( 98, 111, 71, 24 ) );
    Level_compression[3]->setMaxValue( 9 );
    Level_compression[3]->setMinValue( 1 );

    Level_compression[4] = new QSpinBox( groupBox6, "Level_compression[4]" );
    Level_compression[4]->setEnabled( FALSE );
    Level_compression[4]->setGeometry( QRect( 98, 141, 71, 24 ) );
    Level_compression[4]->setMaxValue( 9 );
    Level_compression[4]->setMinValue( 1 );

    textLabel1_3_2_2_3 = new QLabel( step2, "textLabel1_3_2_2_3" );
    textLabel1_3_2_2_3->setGeometry( QRect( 100, 30, 80, 24 ) );

    Path_File[0] = new QLineEdit( step2, "Path_File[0]" );
    Path_File[0]->setEnabled( FALSE );
    Path_File[0]->setGeometry( QRect( 240, 140, 330, 24 ) );

    copri = new QLabel( centralWidget(), "copri" );
    copri->setGeometry( QRect( 10, 490, 600, 40 ) );

    groupBox5 = new QGroupBox( centralWidget(), "groupBox5" );
    groupBox5->setGeometry( QRect( 230, 10, 370, 110 ) );

    textLabel2_2 = new QLabel( groupBox5, "textLabel2_2" );
    textLabel2_2->setGeometry( QRect( -10, -120, 350, 80 ) );

    textLabel2 = new QLabel( groupBox5, "textLabel2" );
    textLabel2->setGeometry( QRect( 10, 14, 350, 90 ) );

    about = new QLabel( groupBox5, "about" );
    about->setEnabled( TRUE );
    about->setGeometry( QRect( -280, 478, 670, 161 ) );

    // actions
    fileExitAction = new QAction( this, "fileExitAction" );
    helpAbout_meAction = new QAction( this, "helpAbout_meAction" );
    Italiano = new QAction( this, "Italiano" );
    Inglese = new QAction( this, "Inglese" );


    // toolbars
    toolBar = new QToolBar( QString(""), this, DockTop ); 

    fileExitAction->addTo( toolBar );


    // menubar
    MenuBar = new QMenuBar( this, "MenuBar" );


    fileMenu = new QPopupMenu( this );
    fileMenu->insertSeparator();
    fileMenu->insertSeparator();
    fileExitAction->addTo( fileMenu );
    MenuBar->insertItem( QString(""), fileMenu, 1 );

    Language = new QPopupMenu( this );
    Language->insertSeparator();
    Italiano->addTo( Language );
    Inglese->addTo( Language );
    MenuBar->insertItem( QString(""), Language, 2 );

    Help = new QPopupMenu( this );
    helpAbout_meAction->addTo( Help );
    MenuBar->insertItem( QString(""), Help, 3 );

    languageChange();
    resize( QSize(620, 532).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( fileExitAction, SIGNAL( activated() ), this, SLOT( fileExit() ) );
    connect( helpAbout_meAction, SIGNAL( activated() ), this, SLOT( aboutme() ) );
    connect( pushButton3, SIGNAL( clicked() ), this, SLOT( Avanti() ) );
    connect( pbok, SIGNAL( clicked() ), this, SLOT( Converti() ) );
    connect( Italiano, SIGNAL( activated() ), this, SLOT( italiano() ) );
    connect( Inglese, SIGNAL( activated() ), this, SLOT( inglese() ) );

    // tab order
    setTabOrder( spinBox1, pushButton3 );
    setTabOrder( pushButton3, txt_main_title );
    setTabOrder( txt_main_title, Gamecodes[0] );
    setTabOrder( Gamecodes[0], Path_File[0] );
    setTabOrder( Path_File[0], Path_File[1] );
    setTabOrder( Path_File[1], Path_File[2] );
    setTabOrder( Path_File[2], Path_File[3] );
    setTabOrder( Path_File[3], Path_File[4] );
    setTabOrder( Path_File[4], Level_compression[0] );
    setTabOrder( Level_compression[0], Level_compression[1] );
    setTabOrder( Level_compression[1], Level_compression[2] );
    setTabOrder( Level_compression[2], Level_compression[3] );
    setTabOrder( Level_compression[3], Level_compression[4] );
    setTabOrder( Level_compression[4], pbok );
}

/*
 *  Destroys the object and frees any allocated resources
 */
Form1::~Form1()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Form1::languageChange()
{
    setCaption( tr( "PopStation GUI - bigboss - www.psp-ita.com" ) );
    loglabel->setText( tr( "LOG:" ) );
    step1->setTitle( tr( "Step 1" ) );
    pushButton3->setText( tr( "Avanti" ) );
    textLabel3->setText( tr( "<font size=\"-1\">Inserire il numero dei dischi:</font>" ) );
    step2->setTitle( tr( "Step 2" ) );
    textLabel4_2_2_3->setText( tr( "3" ) );
    textLabel4_2_3->setText( tr( "2" ) );
    textLabel4_2_2_2_2->setText( tr( "4" ) );
    textLabel4_2_2_2_2_2->setText( tr( "5" ) );
    textLabel4_3->setText( tr( "1" ) );
    textLabel1_3_2_2_3_2->setText( tr( "<font size=\"-1\">Gamecodes:</font>" ) );
    pbok->setText( tr( "Converti" ) );
    textLabel1_3_2_2_4->setText( tr( "<font size=\"-1\">Path dell'iso:</font>" ) );
    groupBox6->setTitle( tr( "Compression level:" ) );
    textLabel1_3_2_2_2->setText( tr( "Cd2:" ) );
    textLabel1_3_2_2_2_2->setText( tr( "Cd3:" ) );
    textLabel1_3_2_2_2_2_2->setText( tr( "Cd4:" ) );
    textLabel1_3_2_2_2_2_2_2->setText( tr( "Cd5:" ) );
    textLabel1_3_2_2->setText( tr( "Cd1:" ) );
    textLabel1_3_2_2_3->setText( tr( "<font size=\"-1\">Titolo gioco:</font>" ) );
    copri->setText( QString::null );
    groupBox5->setTitle( tr( "Info:" ) );
    textLabel2_2->setText( tr( "<font size=\"-1\">Insert the number of disks that we wanna convert and the click on \"<b>next</b>\" button.\n"
"Next manually compile the empty fields (title, gamecode, compression level, path) and click on \"<b>convert</b>\" button</font>" ) );
    textLabel2->setText( tr( "<font size=\"-1\">Inserire il numero dei dischi da convertire e cliccare sul tasto \"<b>avanti</b>\".\n"
"Successivamente compilare manualmente i campi vuoti(titolo,gamecode,livelli di compressione e path) e cliccare sul tasto \"<b>converti</b>\"</font>" ) );
    about->setText( tr( "Popstation:md GUI is a convenient interface for linux that simplifies use of dark alex's \n"
"popstation_md.\n"
"\n"
"if you have suggestions or proposal contact me to one of the next email addresses:\n"
"bigboss1990@gmail.com\n"
"h4xbyt3@email.it\n"
"\n"
"also you can send me a personal message on psp-ita.com\n"
"\n"
"Coded: Bigboss" ) );
    fileExitAction->setText( tr( "Exit" ) );
    fileExitAction->setMenuText( tr( "E&xit" ) );
    fileExitAction->setAccel( QString::null );
    helpAbout_meAction->setText( tr( "About" ) );
    helpAbout_meAction->setMenuText( tr( "About" ) );
    Italiano->setText( tr( "Italiano" ) );
    Italiano->setMenuText( tr( "Italiano" ) );
    Inglese->setText( tr( "English" ) );
    Inglese->setMenuText( tr( "English" ) );
    toolBar->setLabel( tr( "Tools" ) );
    if (MenuBar->findItem(1))
        MenuBar->findItem(1)->setText( tr( "&File" ) );
    if (MenuBar->findItem(2))
        MenuBar->findItem(2)->setText( tr( "&Language" ) );
    if (MenuBar->findItem(3))
        MenuBar->findItem(3)->setText( tr( "&Help" ) );
}

